#pragma once

#include "PluginBase.h"

class CMirandaPlugin
	: public CPluginBase
{
public:
	CMirandaPlugin();

private:
	virtual const std::string GetUserName() const
	{
		DBVARIANT dbv = {0};
		std::string strUserName;

		if (0 == DBGetContactSettingUTF8String(NULL, VERSION_PRODUCTNAME, "Login", &dbv))
			strUserName = dbv.pszVal;

		DBFreeVariant(&dbv);
		return strUserName;
	}

	virtual const std::string GetPasswordHash() const
	{
		DBVARIANT dbv = {0};
		std::string strPasswordHash;

		if (0 == DBGetContactSettingUTF8String(NULL, VERSION_PRODUCTNAME, "PasswordHash", &dbv))
			strPasswordHash = dbv.pszVal;

		DBFreeVariant(&dbv);
		return strPasswordHash;
	}

	virtual void OnSetLocation
		( IN const std::string& strLocation
		);
};
